﻿@model IEnumerable<string>
@{
    bool horizotal = ((bool)(ViewContext.RouteData.Values["horizontalLayout"] ?? false));
    string wrapperClasses = horizotal ? "btn-group btn-group-sm btn-groupjustified" : null;
}
<div class="@wrapperClasses">
    @Html.ActionLink("Home","List","product",
    new { @class=horizotal?"btn btn-default btn-sm":"btn btn-block btn-default btn-lg"})

    @foreach (var link in Model)
    {
        @Html.RouteLink(link, new
   {
       controller="Product",
       action="List",
       category=link,
       page=1
   },new
   {
       @class = (horizotal ? "btn btn-default btn-sm" : "btn btn-block btn-default btn-lg")
            + (link == ViewBag.SelectedCategory ? " btn-primary" : "")
   }
       )
    }

</div>